
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "SH_Run"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
  If Target.Address = Application.[ft].Address Then
    Cancel = True
    With Application.FileDialog(1)
      .AllowMultiSelect = False
      .Filters.Clear
      .Filters.Add "Текстовый файл", "*.txt"
      .Title = "Выберите файл, который хотите набирать по памяти"
      If .Show = -1 Then
        fn = .SelectedItems(1)
        tmp = Replace(fn, ThisWorkbook.Path & "\", "")
        If InStr("\", tmp) = 0 Then [ft] = tmp Else [ft] = fn
      End If
    End With
    rwOpts ("ap"), 0: rwOpts "np", 0
    rwOpts ("aw"), 0: rwOpts "nw", 0
  End If
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
  If Target.Address = Application.[ft].Address Then
    rwOpts ("ap"), 0: rwOpts "np", 0
    rwOpts ("aw"), 0: rwOpts "nw", 0
    If Len(Target) = 0 Or Target = "<Clipboard>" Then
      Application.EnableEvents = 0
      Target = IDclb
      Application.EnableEvents = 1
    End If
  End If
End Sub
